import { ResPage, Meter, ResultData } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 万能表管理模块
 */
// 获取万能表列表
export const getMeterList = (params: Meter.ReqMeterParams) => {
  return http.post<ResPage<Meter.ResMeterList>>(`/device/meter/query`, params);
};
// 获取万能表详情
export const getMeterDtl = (params: { deviceId: string }) => {
  return http.post<ResultData>(`/device/meter/detail`, params);
};
// 新增万能表
export const addMeter = (params = {}) => {
  return http.post(`/device/meter/add`, params);
};
// 编辑万能表
export const editMeter = (params: { meterId: string }) => {
  return http.post(`/device/meter/modify`, params);
};

// 删除万能表
export const deleteMeter = (params: { meterList: { meterId: string }[] }) => {
  return http.post(`/device/meter/remove`, params);
};
